<?php
class UserCategory extends AppModel
{
    var $name = 'UserCategory';
    
    
    function delbycat($cat_id,$user_id)
    {
        $usercategory = $this->find('first',array(
            'conditions'    => array(
                'UserCategory.category_id'  => $cat_id,
                'UserCategory.user_id'      => $user_id
            )
        ));
        if(!empty($usercategory))
        {
            $rs =  $this->del($usercategory['UserCategory']['id']);
        }
    }
}
?>